﻿using System;

namespace dPet.Domain.Models
{
	using Hangerd.Entity;

	public class InventoryReducingRecord : EntityBase
	{
		#region Public Properties

		/// <summary>
		/// 所属医院ID
		/// </summary>
		public string HospitalId { get; private set; }

		/// <summary>
		/// 商品ID
		/// </summary>
		public string ProductId { get; private set; }

		/// <summary>
		/// 订单号
		/// </summary>
		public string OrderNumber { get; private set; }

		/// <summary>
		/// 库存编号
		/// </summary>
		public string InventoryNumber { get; private set; }

		/// <summary>
		/// 出库量
		/// </summary>
		public int ReduceQuantity { get; private set; }

		#endregion

		#region Constructors

		private InventoryReducingRecord() { }

		public InventoryReducingRecord(ProductInventory productInventory, OrderBase order, int reduceQuantity)
		{
			this.HospitalId = productInventory.Product.HospitalId;
			this.ProductId = productInventory.Product.Id;
			this.InventoryNumber = productInventory.InventoryNumber;
			this.OrderNumber = order.OrderNumber;
			this.ReduceQuantity = reduceQuantity;
		}

		#endregion

		#region Public Methods

		#endregion
	}
}
